<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="theme-color">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <link rel="shortcut icon" href="./favicon.ico">
    <link rel="stylesheet" href="__PUBLIC__/apps/css/reset.css">
    <link rel="stylesheet" href="__PUBLIC__/apps/css/index.css">
    <script src="__PUBLIC__/apps/js/jquery-3.1.1.min.js"></script>
    <title>　金蚂蚁装修网</title>

    <script>!function (e, t) { function i() { var t = r.getBoundingClientRect().width; (function () { for (var e = navigator.userAgent, t = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"), i = !0, a = 0; a < t.length; a++)if (e.indexOf(t[a]) > 0) { i = !1; break } return i })() && t < 2047 && (t = t > 540 ? 540 : t); var i = t / 7.5; r.style.fontSize = i + "px", s.rem = e.rem = i } var a, n = e.document, r = n.documentElement, o = n.querySelector('meta[name="viewport"]'), d = n.querySelector('meta[name="flexible"]'), l = 0, m = 0, s = t.flexible || (t.flexible = {}); if (o) { console.warn("将根据已有的meta标签来设置缩放比例"); var p = o.getAttribute("content").match(/initial\-scale=([\d\.]+)/); p && (m = parseFloat(p[1]), l = parseInt(1 / m)) } else if (d) { var c = d.getAttribute("content"); if (c) { var u = c.match(/initial\-dpr=([\d\.]+)/), f = c.match(/maximum\-dpr=([\d\.]+)/); u && (l = parseFloat(u[1]), m = parseFloat((1 / l).toFixed(2))), f && (l = parseFloat(f[1]), m = parseFloat((1 / l).toFixed(2))) } } if (!l && !m) { e.navigator.appVersion.match(/android/gi); var v = e.navigator.appVersion.match(/iphone/gi), h = (e.navigator.appVersion.match(/ipad/gi), e.devicePixelRatio); m = 1 / (l = v ? h >= 3 && (!l || l >= 3) ? 3 : h >= 2 && (!l || l >= 2) ? 2 : 1 : 1) } if (r.setAttribute("data-dpr", l), !o) if ((o = n.createElement("meta")).setAttribute("name", "viewport"), o.setAttribute("content", "initial-scale=" + m + ", maximum-scale=" + m + ", minimum-scale=" + m + ", user-scalable=no"), r.firstElementChild) r.firstElementChild.appendChild(o); else { var g = n.createElement("div"); g.appendChild(o), n.write(g.innerHTML) } e.addEventListener("resize", function () { clearTimeout(a), a = setTimeout(i, 300) }, !1), e.addEventListener("pageshow", function (e) { e.persisted && (clearTimeout(a), a = setTimeout(i, 300)) }, !1), "complete" === n.readyState ? n.body.style.fontSize = 14 * l + "px" : n.addEventListener("DOMContentLoaded", function (e) { n.body.style.fontSize = 14 * l + "px" }, !1), i(), s.dpr = e.dpr = l, s.refreshRem = i, s.rem2px = function (e) { var t = parseFloat(e) * this.rem; return "string" == typeof e && e.match(/rem$/) && (t += "px"), t }, s.px2rem = function (e) { var t = parseFloat(e) / this.rem; return "string" == typeof e && e.match(/px$/) && (t += "rem"), t } }(window, window.lib || (window.lib = {}))
    </script>


</head>
<body class="Company_list">
    <div class="nav">
        <a href="{:U('Index/index')}">
            <首页</a>
                <p>{$tit.name}</p>
    </div>
    <div class="seach">
        <input type="text" placeholder="请输入您寻找的装修公司" id="keyword">
        <button id="seach">搜索</button>
    </div>
    <script>
    $("#seach").click(function(){
        var keyword=$("#keyword").val()
        $.ajax({
            type:'post',
            url:"{:U('Company/seach')}",
            data:{
                keyword:keyword
            },
            dataType:'json',
            success:function(data){
                        $(".list").empty();
                        var html='';
                        for(var i=0; i<data.length;i++){
                            var id=data[i].id
                            var html1 = "__MODULE__/Company/deatil?id="+id
                            var url = '<img src="__PUBLIC__/Upload/'+data[i].imagename+'">'
                            html+='<li><a href="'+html1+'"><div class="logo">'+url+'</div><div class="right"><h2>'+data[i].cname+'</h2><p>口碑值：<b>'+data[i].koubei
                            +'</b></p><p><span>推荐指数:</span><span class="five"></span></p></div></a></li>'
                        }
                        $(".list").append(html);//追加到你需要放在的位置
                    }
        })
    })
    </script>
    <ul class="list clearfix" >
    <foreach name="arr" item="v">
        <li>
           <a href="{:U('Company/deatil',array('id'=>$v['id']))}">
                <div class="logo">
                    <img src="__PUBLIC__/Upload/{$v.imagename}" alt="">
                </div>
                <div class="right">
                    <h2>{$v.cname}</h2>
                    <p>口碑值：
                        <b>{$v.koubei}</b>
                    </p>
                    <p><span>推荐指数:</span>
                        <span class="five"></span>
                    </p>
                </div>
           </a>
        </li>
    </foreach>
    </ul> 
    <footer style="margin-bottom:0">
        
    </footer>

</body>
</html>